package com.appleyk.spring.security.controller;

import org.springframework.web.bind.annotation.*;

/**
 * <p>越努力，越幸运</p>
 *
 * @author appleyk
 * @version V.0.1.1
 * @blob https://blog.csdn.net/appleyk
 * @date created on  8:27 下午 2021/1/4
 */
@RestController
@CrossOrigin
@RequestMapping(value = "auth",produces = {"text/plain;charset=utf-8"})
public class LoginController {

    @PostMapping("/login-success")
    public String loginSuccess(){
        return "登录成功";
    }

    @PostMapping("/login-fail")
    public String loginFail(){
        return "登录失败";
    }

    @GetMapping("/hello")
    public String hello(){
        return "你好";
    }

    // 访问资源r1
    @GetMapping("/r/r1")
    public String getResource1(){
        return "访问资源1";
    }

    // 访问资源r1
    @GetMapping("/r/r2")
    public String getResource2(){
        return "访问资源2";
    }
}
